# selenium 处理 iframe
from selenium.webdriver import Chrome
from selenium.webdriver.common.keys import Keys
import time

web = Chrome()
web.get("https://www.91kanju.com/vod-play/541-2-1.html")

# 处理 iframe，必须先拿到 iframe，然后切换到 iframe 视角
iframe = web.find_element('xpath', '//*[@id="player_iframe"]')
web.switch_to(iframe)
txt = web.find_element('xpath', '//*[@id="main"]/h3[1]').text
print(txt)

input()